<!DOCTYPE html>
<html lang="en">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title> New Document </title>
  <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
  	<style>
		/*下面可以自己修改*/
    .container{
      margin-top:40px;
    }
	</style>
 </head>
 <body>
  <div class="container">
    <form class="form-horizontal" role="form" id="myform" action="" method="post"> 
        <div class="form-group"> 
          <label for="email" class="col-sm-2 control-label">Email</label> 
          <div class="col-sm-10"> 
            <input type="email" class="form-control" id="email" name="user[email]" placeholder="Email" value="demo@example.com"> 
          </div> 
        </div> 
        <div class="form-group"> 
          <label for="inputPassword3" class="col-sm-2 control-label">技能</label> 
          <div class="col-sm-10"> 
              <label class="checkbox-inline"> 
                <input type="checkbox" name="user[skill][]" value="html5"> HTML5 
              </label> 
              <label class="checkbox-inline"> 
                <input type="checkbox" name="user[skill][]" value="javascript" checked> Javascript 
              </label> 
              <label class="checkbox-inline"> 
                <input type="checkbox" name="user[skill][]" value="PHP" checked> PHP 
              </label> 
              <label class="checkbox-inline"> 
                <input type="checkbox" name="user[skill][]" value="Python"> Python 
              </label> 
              <label class="checkbox-inline"> 
                <input type="checkbox" name="user[skill][]" value="MySQL" checked> MySQL 
              </label> 
              <label class="checkbox-inline"> 
                <input type="checkbox" name="user[skill][]" value="Redis"> Redis 
              </label> 
          </div> 
        </div> 
        <div class="form-group"> 
          <label for="salary" class="col-sm-2 control-label">月薪</label> 
          <div class="col-sm-10"> 
              <select class="form-control" name="user[salary]" id="salary" > 
                <option value="5000">5000以下</option> 
                <option value="5000-10000">5000-10000</option> 
                <option value="10000-20000">10000-20000</option> 
                <option value="20000">20000以上</option> 
              </select> 
          </div> 
        </div> 
        <div class="form-group"> 
          <label for="intro" class="col-sm-2 control-label">自我评价</label> 
          <div class="col-sm-10"> 
              <textarea class="form-control" name="user[intro]" rows="3" id="intro" ></textarea> 
          </div> 
        </div> 
        <div class="form-group"> 
          <div class="col-sm-offset-2 col-sm-10"> 
            <button type="submit" class="btn btn-default" id="subbtn">提交</button> 
          </div> 
        </div>
    </form>
  </div>

  <script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js"></script> 
  <script src="js/jquery.serialize-object.js"></script>
    <script type="text/javascript">
    $(function(){ 
        $(document).on('click', '#subbtn', function(event) { 
            event.preventDefault(); 
             
            var json_data = $('#myform').serializeJSON(); 
            $.post('post.php', json_data, function(data) { 
                console.log(data); 
            }); 
        }); 
    });
  </script>
 </body>
</html>